Run tests with the --target flag
authorAlex Crichton <alex@alexcrichton.com>
Thu, 11 Sep 2014 15:01:41 +0000 (08:01 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 15 Sep 2014 18:45:59 +0000 (11:45 -0700)
Makefile.in

index 5d3725bea88a7b084771d146f5d32604281a86bc..bf493ad0758edee985296e46844b5195fca890a4 100644 (file)
@@ -66,6 +66,9 @@ define CARGO_TARGET
 cargo-$(1): $$(CARGO)
        "$$(CFG_RUSTC)" -v
        $$(CARGO) build --target $(1) $$(OPT_FLAG) $$(ARGS)
+
+test-unit-$(1): $$(CARGO)
+       $$(CARGO) test --target $(1) $$(only)
 endef
 $(foreach target,$(CFG_TARGET),$(eval $(call CARGO_TARGET,$(target))))
 
@@ -76,10 +79,7 @@ $(CARGO): src/snapshots.txt
 
 # === Tests
 
-test: test-unit style no-exes
-
-test-unit: $(CARGO)
-       $(CARGO) test $(only)
+test: test-unit style no-exes $(foreach target,$(CFG_TARGET),test-unit-$(target))
 
 style:
        sh tests/check-style.sh